package com.demo.service;

import com.demo.model.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;

@Service
public class StudentService {

    @Bean
    public Student student1() {
        Student student = new Student();
        student.setAge(12);
        student.setName("张三");
        student.setId(1);
        return student;
    }


    public void sayHi() {
        System.out.println("Hi, Service!");
    }
}
